﻿<?xml version="1.0" encoding="utf-8" ?>
<AdoNetDataAccess connection="$ArticleDBConnection$" >
	<Sql>
		DELETE FROM PrivilegeLevel WHERE id=convert(nvarchar(510),@id);
		DELETE FROM ThreadPosts WHERE threadId IN (SELECT id FROM ForumThreads WHERE forumId IN (SELECT id FROM Forum WHERE forumGroupId=@id));
		DELETE FROM ForumThreads WHERE forumId IN (SELECT id FROM Forum WHERE forumGroupId=@id);
		DELETE FROM Forum WHERE forumGroupId=@id;
		DELETE FROM ForumGroup WHERE id=@id;
		DELETE FROM ArticleGroup WHERE id=@id;
		</Sql>
<Param name="groupId" DbName="id" type="UniqueIdentifier"/>
</AdoNetDataAccess>